package com.etc.homework;

import java.util.Arrays;

/**
 * @author: knowno
 * @create: 2024-09-05 09:13
 * @Version 1.0
 **/
public class TestStudent {
    public static void main(String[] args) {

        Student s1 = new Student(1, "a", 21, 171);
        Student s2 = new Student(2, "B", 22, 172);
        Student s3 = new Student(3, "C", 23, 173);
        Student s4 = new Student(4, "D", 24, 174);

        Student s5 = new Student(5, "e", 25, 175);

        Student students[] = {s3, s2, s1, s5, s4};
        System.out.println("***************原始数组-未排序**********************");

        //输出数组元素
        System.out.println(Arrays.toString(students));
        System.out.println("***************排序后**********************");
        //冒泡排序
//        BubbleSort.bubbleSorting(students);
//        //输出数组元素
//        System.out.println(Arrays.toString(students));

        System.out.println("*************************************");

        //插入排序
//        InsertionSort.insertionSorting(students);
//        //输出数组元素
//        System.out.println(Arrays.toString(students));
//        System.out.println("*************************************");

        //快速排序
        QuickSort.quickSorting(students, 0, students.length - 1);
        //输出数组元素
        System.out.println(Arrays.toString(students));
        System.out.println("*************************************");

//        //选择排序
//        SelecionSort.selectionSorting(students);
//        //输出数组元素
//        System.out.println(Arrays.toString(students));

    }
}
